Public Class WindowsUIForm

  Private Sub WindowsUIForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ComboBox1.SelectedText = "VB.NET"
    DateTimePicker1.Value = Now.AddDays(5)
    ListBox1.SelectedItem = "VB.NET"
    ComboBox2.AutoLoadDataList = dotNetTips.Utility.UI.Windows.ComboBoxListType.UsStates
    ComboBox3.AutoLoadDataList = dotNetTips.Utility.UI.Windows.ComboBoxListType.Countries
    CheckedListBox1.SelectedIndex = 1
    CheckedListBox1.SetItemCheckState(1, CheckState.Checked)
    Dim item As ListViewItem = ListView1.Items(2)
    item.Selected = True
    item.Checked = True
    MonthCalendar1.SetDate(Now.AddDays(7))

  End Sub

  Private Sub ClearControlsTagButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearControlsTagButton.Click
    dotNetTips.Utility.UI.Windows.ControlsHelper.ClearControls(Me, "SELECTION")
  End Sub

  Private Sub ClearControlsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearControlsButton.Click
    dotNetTips.Utility.UI.Windows.ControlsHelper.ClearControls(Me)

  End Sub

  Private Sub SelectFirstEmptyControlButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectFirstEmptyControlButton.Click
    dotNetTips.Utility.UI.Windows.ControlsHelper.SelectFirstEmptyControl(Me, String.Empty, True)
  End Sub

  Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged

  End Sub

  Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

  End Sub

  Private Sub ListControlsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListControlsButton.Click

    Dim controls As System.Collections.Generic.SortedDictionary(Of String, Control) = dotNetTips.Utility.UI.Windows.ControlsHelper.FindControls(Me, String.Empty, True)

    For Each key As String In controls.Keys
      Me.OutputListBox.Items.Add(String.Format("{0} - {1}", controls.Item(key).Name, key))
    Next

  End Sub
End Class